#include<bits/stdc++.h>
using namespace std;
const int N=1e5+7;
int n,a[N],b[N],ct,ans,cnt=1;
int main() {
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;++i) scanf("%d",&a[i]);
    sort(a+1,a+n+1);
    for(int i=2;i<=n;++i) {
        if(a[i]!=a[i-1]) {
            b[++ct]=cnt;
            cnt=1;
        }
        else ++cnt;
    }
    b[++ct]=cnt;
    for(int i=2;i<=ct;++i) {
        if(b[i]<b[i-1]) {
            ans+=b[i-1]-b[i];
        }
        else {
            if(b[i]-b[i-1]<=ans) ans-=(b[i]-b[i-1]);
            else ans=0;
        }
    }
    ans+=b[ct];
    printf("%d",ans);
    return 0;
}
